package com.sojson.config.qps.sentinel.aspect;

import java.lang.reflect.Method;

import org.aspectj.lang.ProceedingJoinPoint;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.csp.sentinel.annotation.aspectj.AbstractSentinelAspectSupport;
import com.sojson.annotation.aspect.PointcutsClient;

/**
 * 这个类是为了处理访问权限不足导致无法在工具类中直接调用的问题
 * 
 * @author liu
 * @date 2021-09-10
 */
public class ASentinelAspectSupport extends AbstractSentinelAspectSupport implements PointcutsClient {

    @Override
    public Method resolveMethod(ProceedingJoinPoint joinPoint) {
        return super.resolveMethod(joinPoint);
    }

    @Override
    public String getResourceName(String resourceName, Method method) {
        return super.getResourceName(resourceName, method);
    }

    @Override
    public boolean exceptionBelongsTo(Throwable ex, Class<? extends Throwable>[] exceptions) {
        return super.exceptionBelongsTo(ex, exceptions);
    }

    @Override
    public void traceException(Throwable ex, SentinelResource annotation) {
        super.traceException(ex, annotation);
    }

    @Override
    public Object handleFallback(ProceedingJoinPoint pjp, SentinelResource annotation, Throwable ex) throws Throwable {
        return super.handleFallback(pjp, annotation, ex);
    }

}